<div  class="box">
<table class="boxlist">
	<thead >
		<tr >
			<th style='width:80px;'>
				Code
			</th>
			<th >
				Name
			</th>
			<th >
				Artist
			</th>
			<th class='sortable' col='year' style='width:80px;'>
				Year
			</th>
			<th style='width:150px;'>
				Action
			</th>
		</tr>
	</thead>
<?php foreach ($rs as $row): ?>
	<tr >
		<td >
			<?php $code = '#'.str_pad($row->id,3,'0',STR_PAD_LEFT) ?>
			<?php
				$label = $code;
				$rurl= array('quickview','id'=>$row->id);
				$htmlOption = array('class'=>'colorbox');
				echo CHtml::link($label,$rurl,$htmlOption);
			?>
		</td>
		<td >
			<?php echo $row->name ?>
		</td>
		<td >
			<?php $artist = Fish::getRow('artist',$row->artist_id); ?>
			<?php echo $artist['name'] ?>
		</td>
		<td >
			<?php echo $row->year ?>
		</td>
		<td >
			<?php
				$label = '<button class="bt3">Edit</button>';
				$rurl= array('album/update','id'=>$row->id);
				$htmlOption = array('style'=>'float:left;');
				echo CHtml::link($label,$rurl,$htmlOption);
			?>
			<?php echo Chtml::beginForm(array('delete'),'post',array('style'=>'float:left;')) ?>
			<input type="hidden" name="Reference[id]" value="<?php echo $row->id ?>" />
			<?php
				$label = '<button class="bt3">Delete</button>';
				$rurl= array('album/delete','id'=>$row->id);
				$htmlOption = array('class'=>'confirm');
				echo CHtml::link($label,$rurl,$htmlOption);
			?>
			<?php echo Chtml::endForm(); ?>
		</td>
	</tr>
<?php endforeach ?>
</table>
<div class='filter silver'>
	
</div>
<div class='tail filter blue'>
	
</div>
</div>
